function ajaxHLA1(sString, sType)
{
    var xmlHttp;
	var sURL = "ajaxHLA1.asp";
	
	try
    {  
         // Firefox, Opera 8.0+, Safari  
         xmlHttp=new XMLHttpRequest();  
     }
     catch (e)
     { 
         // Internet Explorer  
         try
         {    
               xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");    
         }
         catch (e)
         {    
               try
               {      
                     xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");     
               }
               catch (e)
               {      
                     //alert("Your browser does not support AJAX!");      
                     return false;      
               }    
         }  
     }
   
     xmlHttp.onreadystatechange=function()
     {
         if(xmlHttp.readyState==4)
         {
               document.getElementById("suggestionList1").innerHTML=xmlHttp.responseText;
         }
     }
	 sURL = sURL + "?" + "hla_allele1=" + sString + "&hla_type_locus=" + sType;
     xmlHttp.open("GET", sURL, true);
     xmlHttp.send(null);  
}
function ajaxHLA1Hide()
{
		document.getElementById("suggestionBox1").style.visibility="hidden";		
}
function ajaxHLA1Show()
{
		var iLength;
		iLength = document.getElementById("hla_allele1").value.length;
		
		if (iLength > 0)
		{
				document.getElementById("suggestionBox1").style.visibility="visible";
				document.getElementById("suggestionBox1").style.display="";						
		}
		else
		{
				document.getElementById("suggestionBox1").style.visibility="hidden";
		}
}
function fctFillHLA1(sString)
{
		document.getElementById("hla_allele1").value=sString;
}
function fctCopyValue()
{
		document.getElementById("hla_allele2").value=document.getElementById("hla_allele1").value;
}
function fctSetFocus1()
{
		document.getElementById("hla_allele1").focus();	
}
function fctSetFocus2()
{
		document.getElementById("hla_allele2").focus();	
}
//============================================================================================================================
function ajaxHLA2(sString, sType)
{
    var xmlHttp;
	var sURL = "ajaxHLA2.asp";
	
	if(document.getElementById("hla_allele2").value!=document.getElementById("hla_allele1").value)
	{
		try
		{  
			 // Firefox, Opera 8.0+, Safari  
			 xmlHttp=new XMLHttpRequest();  
		 }
		 catch (e)
		 { 
			 // Internet Explorer  
			 try
			 {    
				   xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");    
			 }
			 catch (e)
			 {    
				   try
				   {      
						 xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");     
				   }
				   catch (e)
				   {      
						 //alert("Your browser does not support AJAX!");      
						 return false;      
				   }    
			 }  
		 }
	   
		 xmlHttp.onreadystatechange=function()
		 {
			 if(xmlHttp.readyState==4)
			 {
				   document.getElementById("suggestionList2").innerHTML=xmlHttp.responseText;
			 }
		 }
		 sURL = sURL + "?" + "hla_allele2=" + sString + "&hla_type_locus=" + sType;
		 xmlHttp.open("GET", sURL, true);
		 xmlHttp.send(null);  
	};
}
function ajaxHLA2Hide()
{
		document.getElementById("suggestionBox2").style.visibility="hidden";		
}
function ajaxHLA2Show()
{
	if(document.getElementById("hla_allele2").value!=document.getElementById("hla_allele1").value)
	{	
		var iLength;
		iLength = document.getElementById("hla_allele2").value.length;
		
		if (iLength > 0)
		{
				document.getElementById("suggestionBox2").style.visibility="visible";
				document.getElementById("suggestionBox2").style.display="";						
		}
		else
		{
				document.getElementById("suggestionBox2").style.visibility="hidden";
		}
	}
}
function fctFillHLA2(sString)
{
		document.getElementById("hla_allele2").value=sString;
}